import React from 'react'
import { Card, Row, Col } from 'antd';

export default function StudentDetail(props) {
    console.log(props)
    const currentRow = props.location.row;
    return (
        <div>
            <h1>学生详情页</h1>
            {/* <h2>id：{props.match.params.id}</h2> */}
            <Card>
                <Row>
                    <Col span={24}>
                        <label style={{
                            width: '80px',
                            marginBottom: '20px',
                            fontWeight: 'bold',
                            display: 'inline-block',
                            textAlign: 'right'
                        }}>学号：</label>
                        <span>{currentRow.sNo}</span>
                    </Col>
                    <Col span={24}>
                        <label style={{
                            width: '80px',
                            marginBottom: '20px',
                            fontWeight: 'bold',
                            display: 'inline-block',
                            textAlign: 'right'
                        }}>姓名：</label>
                        <span>{currentRow.name}</span>
                    </Col>
                    <Col span={24}>
                        <label style={{
                            width: '80px',
                            marginBottom: '20px',
                            fontWeight: 'bold',
                            display: 'inline-block',
                            textAlign: 'right'
                        }}>性别：</label>
                        <span>{currentRow.sex}</span>
                    </Col>
                    <Col span={24}>
                        <label style={{
                            width: '80px',
                            marginBottom: '20px',
                            fontWeight: 'bold',
                            display: 'inline-block',
                            textAlign: 'right'
                        }}>出生年份：</label>
                        <span>{currentRow.sNo}</span>
                    </Col>
                    <Col span={24}>
                        <label style={{
                            width: '80px',
                            marginBottom: '20px',
                            fontWeight: 'bold',
                            display: 'inline-block',
                            textAlign: 'right'
                        }}>联系方式：</label>
                        <span>{currentRow.phone}</span>
                    </Col>
                    <Col span={24}>
                        <label style={{
                            width: '80px',
                            marginBottom: '20px',
                            fontWeight: 'bold',
                            display: 'inline-block',
                            textAlign: 'right'
                        }}>电子邮箱：</label>
                        <span>{currentRow.email}</span>
                    </Col>
                    <Col span={24}>
                        <label style={{
                            width: '80px',
                            marginBottom: '20px',
                            fontWeight: 'bold',
                            display: 'inline-block',
                            textAlign: 'right'
                        }}>地址：</label>
                        <span>{currentRow.address}</span>
                    </Col>
                </Row>
            </Card>
        </div>
    )
}
